<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>L2</title>
    <style>
        [v-cloak] {
            display: none;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <ul>
            <li v-for="(item,i) in userlist">
                {{i+1}}.{{item.name}}
                <img v-bind:src="item.img" style="width:100px;height: 100px">
            </li>
        </ul>
    </div>
    <script src="https://cdn.bootcss.com/vue/2.6.4/vue.js"></script>
    <script src="https://cdn.bootcss.com/axios/0.19.0-beta.1/axios.js"></script>
    <script>
        new Vue({
            el: "#app",
            data: {
                userlist: []
            },
            created() {
                this.getUserList()
            },
            methods: {
                getUserList() {
                    axios.get('userlist.json').then(res => {
                        this.userlist = res.data
                    })
                }
            },
        })
    </script>
</body>

</html>